<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../common.inc" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="./css/style1.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./js/form.js"></script>
<script type="text/javascript" language="javascript">
<!--

	function checkForm(){
		var objs = document.getElementsByName("id");
		var sign = 0;
		for(var i = 0; i < objs.length; i++){
			if(objs[i].checked){
				sign = sign + 1;
			}
		}
		if(sign <= 0){
			alert("请选择信息项!");
			return false;
		}
		return true;
	}
	
	function readed(){
		if(checkForm()){
			document.auditRemindForm.action = "./auditRemind.do?action=readedAuditInfo";
			document.auditRemindForm.target = "main";
			document.auditRemindForm.submit();
		}
	}
	
	function deleteInfo(){
		if(checkForm()){
			document.auditRemindForm.action = "./auditRemind.do?action=deleteAuditInfo";
			document.auditRemindForm.target = "main";
			document.auditRemindForm.submit();
		}
	}
	
	function pageCustomer(flag){
		document.auditRemindForm.action = "./auditRemind.do?action=display&flag="+flag;
		document.auditRemindForm.target = "main";
		document.auditRemindForm.submit();
	}
	
	function initPage(){
		if("<c:out value='${result}'/>" == 1){
			alert("操作成功！");
		}
	}
-->
</script>
</head>
<body onload="initPage()">
<form name="auditRemindForm" action="" method="post">
	<table class="table_frame">
		<tr>
			<td>
				<table class="table_title1">
					<tr>
						<td class="title_lab" colspan="2">审核通知</td>
					</tr>
					<tr>
						<td valign="bottom" class="a_tools" style="padding-left: 3px;padding-top: 4px;">
							<a class="read" href="javascript:readed();" title="已阅" hidefocus="true">已阅</a>
							<a class="del" href="javascript:deleteInfo();" title="删除" hidefocus="true">删除</a>
						</td>
						<td></td>
					</tr>
					<tr><td height="2" colspan="2"></td></tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<table class="table_title2">
					<tr>
						<td class="title_lab">审核通知</td>
						<td align="right" valign="">
							<!-- page -->
							<table class="table_page2">
								<tr>
									<td valign="bottom">
										<img src="./images/frist.bmp" onclick="pageCustomer(1)" alt="首页" style="vertical-align: middle;cursor: hand;">
										<img src="./images/last.bmp" onclick="pageCustomer(2)" alt="上一页" style="vertical-align: middle;cursor: hand;">&nbsp;
										<font color="red">${currentPage}</font>/${totalPages}&nbsp;<fmt:message key='common.page'/>&nbsp;
										<img src="./images/next.bmp" onclick="pageCustomer(3)" alt="下一页" style="vertical-align: middle;cursor: hand;">
										<img src="./images/end.bmp" onclick="pageCustomer(4)" alt="末页" style="vertical-align: middle;cursor: hand;">
										共&nbsp;&nbsp;${totalRows}&nbsp;<fmt:message key='common.page.totalRow'/>&nbsp;&nbsp;&nbsp;
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr><td colspan="3" height="2"></td></tr>
					<tr>
						<td colspan="2">
							<table class="table">
								<tr>
									<td valign="top">
										<!-- 
										<div style="width:800px;height:100%;overflow-x: scroll;overflow-y: hidden;">
										 -->
										<table class="table_style">
											<tr>
												<td class="title" width="8"></td>
												<td class="title" width="30">选择</td>
												<td class="title" width="10%">状态</td>
												<td class="title" width="10%">来源</td>
												<td class="title" width="10%">发起人</td>
												<td class="title" width="">内容描述</td>
												<td class="title" width="14%">提醒时间</td>
												<td class="title" width="14%">处理时间</td>
											</tr>
											<c:forEach var="warningInfo" items="${warningInfos}">
											<c:if test="${isAuditAllInvoice != 1 && warningInfo.sponsorId != userId}">
											<tr onmouseover="onmousemoveChange(this,'img${warningInfo.id}')" onmouseout="onmouseoutChange(this,'img${warningInfo.id}')">
												<td height="16" width="8" align="right"><img id="img${warningInfo.id}" src="./images/table_sign2.bmp"></td>
												<td><input id="id" name="id" type="checkbox" value="${warningInfo.id}"/></td>
												<td>
												<c:choose>
													<c:when test="${warningInfo.isRead == '1'}">未读</c:when>
													<c:when test="${warningInfo.isRead == '2'}">已阅</c:when>
												</c:choose>
												</td>
												<td>
												<c:choose>
													<c:when test="${warningInfo.warningSource == '1'}">合同</c:when>
													<c:when test="${warningInfo.warningSource == '2'}">费用</c:when>
												</c:choose>
												</td>
												<td>${warningInfo.sponsor}</td>
												<td align="left">
												<c:choose>
													<c:when test="${warningInfo.warningSource == '1'}">待审合同：编号${warningInfo.foreignCode}&nbsp;&nbsp;${warningInfo.foreignName}</c:when>
													<c:when test="${warningInfo.warningSource == '2'}">待审费用：申请单&nbsp;&nbsp;${warningInfo.foreignCode}</c:when>
												</c:choose>
												</td>
												<td><fmt:formatDate value="${warningInfo.warningDate}" pattern="yyyy-MM-dd HH:mm"/></td>
												<td><fmt:formatDate value="${warningInfo.processDate}" pattern="yyyy-MM-dd HH:mm"/></td>
											</tr>
											</c:if>
											</c:forEach>
										</table>
										<!-- 
										</div>
										 -->
									</td>
								</tr>
								<tr>
									<td align="left" valign="bottom">
										<!-- page -->
										<table id="tp" class="table_page">
											<tr>
												<td>&nbsp;&nbsp;
													<img src="./images/frist.bmp" onclick="pageCustomer(1)" alt="首页" style="vertical-align: middle;cursor: hand;">
													<img src="./images/last.bmp" onclick="pageCustomer(2)" alt="上一页" style="vertical-align: middle;cursor: hand;">&nbsp;
													<font color="red">${currentPage}</font>/${totalPages}&nbsp;<fmt:message key='common.page'/>&nbsp;
													<img src="./images/next.bmp" onclick="pageCustomer(3)" alt="下一页" style="vertical-align: middle;cursor: hand;">
													<img src="./images/end.bmp" onclick="pageCustomer(4)" alt="末页" style="vertical-align: middle;cursor: hand;">
													共&nbsp;&nbsp;${totalRows}&nbsp;<fmt:message key='common.page.totalRow'/>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</form>
</body>
</html>